package com.xyy.saas.payment.common.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.xyy.address.api.BaseRegionBusinessApi;
import com.xyy.address.dto.XyyRegionBusinessDto;
import com.xyy.address.dto.XyyRegionParams;
import com.xyy.saas.payment.util.JSONUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class RegionService {
    @Reference(version = "1.0.0")
    private BaseRegionBusinessApi baseRegionBusinessApi;

    /**
     * 查询区域信息
     */
    public List<XyyRegionBusinessDto> queryRegion(XyyRegionParams param) {
        log.info("RegionService#queryRegion param={}", JSONUtils.toJSON(param));
        return baseRegionBusinessApi.queryRegion(param);
    }
}